import { resetRouter, routes } from "@/router"

export default {
    namespaced: true,
    state: () => {
        return {
            menuList: [...routes]
        }
    },
    mutations: {
        setMenuList(state, asyncRoutes) {
            state.menuList = [...routes, ...asyncRoutes];

        },
        resetMenu(state){
            state.menuList=[...routes]
            resetRouter()

        }
    }
}